![]() |
ThreadID |
Header: Threads.h |
The ThreadID data type defines the thread ID.
enum ThreadID { kNoThreadID = , kCurrentThreadID = 1, kApplicationThreadID = 2 };
Indicates no thread; for example, you can use a function such as
Identifies the currently executing thread.
Identifies the main application thread; this is the cooperative thread that the Thread Manager creates at launch time. You cannot dispose of this thread. All applicationsóeven those that are not aware of the Thread Manageróhave one main application thread. The Thread Manager assumes that the main application thread is responsible for event gathering; when an operating-system event occurs, the Thread Manager schedules the main application thread as the next thread to execute.
The Thread Manager assigns a thread ID to each thread that you create or allocate with the YieldToThread
,
In addition to the specific thread IDs that the NewThread function returns, you can use the three Thread Manager constants described here.
© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)